ar X iv : 1 30 1 . 77 02 v 1 [ cs . P L ] 3 1 Ja n 20 13 The Ciao CLP ( FD ) Library A Modular CLP Extension for Prolog ( System

نویسندگان

  • Jesús Gallego Arias
  • Rémy Haemmerlé
  • Manuel V. Hermenegildo
  • José F. Morales
چکیده

We present a new free library for Constraint Logic Programming over Finite Domains, included with the Ciao Prolog system. The library is entirely written in Prolog, leveraging on Ciao’s module system and code transformation capabilities in order to achieve a highly modular design without compromising performance. We describe the interface, implementation, and design rationale of each modular component. The library meets several design goals: a high level of modularity, allowing the individual components to be replaced by different versions; highefficiency, being competitive with other FD implementations; a glass-box approach, so the user can specify new constraints at different levels; and a Prolog implementation, in order to ease the integration with Ciao’s code analysis components. The core is built upon two small libraries which implement integer ranges and closures. On top of that, a finite domain variable datatype is defined, taking care of constraint reexecution depending on range changes. These three libraries form what we call the FD kernel of the library. This FD kernel is used in turn to implement several higher-level finite domain constraints, specified using indexicals. Together with a labeling module this layer forms what we name the FD solver. A final level integrates the CLP(FD) paradigm with our FD solver. This is achieved using attributed variables and a compiler from the CLP(FD) language to the set of constraints provided by the solver. It should be noted that the user of the library is encouraged to work in any of those levels as seen convenient: from writing a new range module to enriching the set of FD constraints by writing new indexicals.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Ciao clp(FD) Library. A Modular CLP Extension for Prolog

We present a new free library for Constraint Logic Programming over Finite Domains, included with the Ciao Prolog system. The library is entirely written in Prolog, leveraging on Ciao's module system and code transformation capabilities in order to achieve a highly modular design without compromising performance. We describe the interface, implementation, and design rationale of each modular co...

متن کامل

Lightweight compilation of (C)LP to JavaScript

We present and evaluate a compiler from Prolog (and extensions) to JavaScript which makes it possible to use (constraint) logic programming to develop the client side of web applications while being compliant with current industry standards. Targeting JavaScript makes (C)LP programs executable in virtually every modern computing device with no additional software requirements from the point of ...

متن کامل

ar X iv : 1 30 1 . 76 69 v 1 [ cs . P L ] 3 1 Ja n 20 13 Extending the logical update view with transaction support

Since the database update view was standardised in the Prolog ISO standard, the so called logical update view is available in all actively maintained Prolog systems. While this update view provided a well defined update semantics and allows for efficient handling of dynamic code, it does not help in maintaining consistency of the dynamic database. With the introduction of multiple threads and d...

متن کامل

Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW library

We discuss from a practical point of view a number of issues involved in writing distributed Internet and WWW applications using LP/CLP systems. We describe PiLLoW, a publicdomain Internet and WWW programming library for LP/CLP systems that we have designed in order to simplify the process of writing such applications. PiLLoW provides facilities for accessing documents and code on the WWW; pars...

متن کامل

Scheduling with Soft CLP(FD) Solver*

Timetabling problems often consists from various requirements which can not be satisfied together [11]. Unsatisfiable requirements can be handled within optimization criteria as soft constraints. Such soft constraints may not be satisfied if there are some contradictions. The remaining hard constraints must be still satisfied. The set of hard and soft constraints can be naturally expressed usin...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014